<template>
<view class="login-page">
	<!-- <view class="text">神领物流</view> -->
	<view class="header">
		<view class="title">
			手机号登录
		</view>
		<view class="goCount" @click="goCountlogin" >
			账号登录
			<image class="sanjiao" src="@/static/sanjiao.png" mode=""></image>
		</view> 
		</view>
		   <input class="ipt" type="text" placeholder="请输入用户名"  v-model="formData.account" >
		     <view class="er">
		     	<input class="ipt" type="text" placeholder="请输入验证码" v-model="formData.password">
		     	<view v-if="!static" class="yanzhen" @click="getyanzhen">
		     	获取验证码
				</view>
				<view v-else class="daojishi">
					{{count}}秒后重新获取
				</view>
		     </view>
			   
<!-- 	<van-cell-group>
	  <van-field
	    value:username
	    required
	    clearable
	    icon="question-o"
	    placeholder="请输入手机号"
	    bind:click-icon="onClickIcon"
	  />
	
	  <van-field
	    value:password
	    placeholder="请输入验证码"
	    required
	    border="false"
	  />
	</van-cell-group> -->
		<van-button class="btn" type="warning" @click='login'>登录</van-button>
	</view>
</view>
</template>

<script>
	import {getlogin} from '@/api/login.js'
	export default {
		data() {
			return {
				formData:{
					"account":'18357607635',
					"password":''
				},
				"value":'',
				static:false,
				  count:60,
				    timer:''
			}
		},
		methods: {
			goCountlogin(){
				uni.navigateTo({
					url:'/pages/account-login/account-login'
				})
			},
			getyanzhen(){
				this.static=true
			},
			
			async login(){
				const res=await getlogin(this.formData)
				console.log(res);
			}
		}
	}
</script>

<style lang="scss">
	.login-page{
		padding: 30rpx;
	}
.header{
	display: flex;
	justify-content: space-between;
	margin-top: 88rpx;
	margin-bottom: 80rpx;
	.title{
		font-size: 24px;
		font-weight: 600;
	}
}
.goCount{
	display: flex;
		width: 180rpx;
		height: 40px;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		font-size: 16px;
		color: #EF4F3F;
		letter-spacing: 0;
		text-align: right;
		.sanjiao{
			width: 20rpx;
			height: 20rpx;
			// line-height: 20rpx;
			padding-bottom: 60rpx;
			margin-left: 10rpx;
		}
		}
	.van-button{
			width: 618rpx;
			height: 100rpx;
			background: #FADCD9;
			border-radius: 70.54rpx;
			margin-left: 40rpx;
			margin-top: 70rpx;
					}
	.ipt{
		margin-bottom: 50rpx;
		border-bottom: 1px #dbdbdb solid;
		height: 60rpx;
		margin-right: 40rpx;
					}
	.er{
		margin-bottom: 50rpx;
		border-bottom: 1px #dbdbdb solid;
		height: 60rpx;
		display: flex;
		.yanzhen{
			width: 160rpx;
			height: 50rpx;

		}
	}
</style>